package cn.edu.scau.cmi.wangshuhong.composite;
import java.util.ArrayList;
public class TransparentOrganization extends TransparentComponent{
	public TransparentOrganization(String name){
		super(name);
		this.Al=new ArrayList<TransparentComponent>();
	}
	public TransparentOrganization(){
		
	}
	public void add(TransparentComponent a){
		this.Al.add(a);
	}
	public void remove(TransparentComponent b){
		this.Al.remove(b);
	}
	public String displayMember(){
		String s=this.message();
		if(this.Al.isEmpty()){
			s+= "It conclud:nothing\n";
		}
		else{
			s+="It concludes:\n";
			for(TransparentComponent a :this.Al){
				s+=a.message()+"\n";
			}
			for(TransparentComponent b:this.Al){
				s+=b.displayMember();
			}
		}
		return s;
		
	}
	public String message(){
		return "This is an Organization:"+this.name+"\n";
	}
}
